<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>私教明细</title>
    <meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0.maximum-scale=1.0,user-scalable=no" name="viewport">
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/homePage.css">
    <link rel="stylesheet" href="css/flexible.css">
    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="js/flexible.js"></script>
    <script src="js/vue.js"></script>
    <script src="js/MD5.js"></script>
    <script src="js/axios.js"></script>
</head>
<body>
<div class="hd_table" id="app">
    <template>
        <div style="white-space: nowrap;">
            <table>
                <thead>
                    <tr>
                        <th>私教名称</th>
                        <th>上课时间</th>
                        <th>教练</th>
                        <th>消费用卡</th>
                        <th>消费额</th>
                        <th>签到时间</th>
                    </tr>
                </thead>
                <tbody v-if="table.length>0">
                    <tr v-for="item in table">
                        <td>{{item.Ctitle}}</td>
                        <td>{{item.Stime}}-{{item.Etime}}</td>
                        <td>{{item.Sname}}</td>
                        <td>{{item.Cardname}}</td>
                        <td>{{item.Charge}}</td>
                        <td>{{item.Signtime}}</td>
                    </tr>
                </tbody>
            </table>
            <div v-if="table.length==0" class="notDate">
                    暂无数据
            </div>
        </div>
    </template>
    <div class="add_jl"><a href="index.html"><img src="images/back.png"></a></div>
</div>
</body>
<script>
new Vue({
    el: '#app',
    data: {
        uid:'',
        type:'',
        table:[]
    },
    created(){
        this.setCanS()
    },
    methods:{
         //设置参数
         setCanS(){
            let Request = new Object()
            Request = GetRequest()
            this.uid = Request['uid']
            this.type = Request['type']
            this.getList()
        },
        //获取信息
        getList(){
            getVs()
            const params={
                uid:this.uid,
                type:this.type
            }
            axios.get('/mobileapi/adviser/user.php?act=curr_sign',{params:params}).then(data =>{
                console.log(data.data)
                let { msg, code,user} = data.data
                    if (code !== 200) {
                        _this.$message({
                            message: msg,
                            type: 'error'
                        });
                    } else {
                        this.table=data.data.data
                        console.log(this.table)

                    }
                }).catch(function (error) { 
                    console.log(error); 
            });
        },
        
    }
})       
</script>
</html>